package com.centaline.androidsalesblog.api;

import com.centaline.androidsalesblog.model.businissobject.WxUserInfoBo;
import com.centanet.framework.interfaces.IResponseListener;

/**
 * 微信用户信息获取
 * Created by guilin on 16/4/11.
 */
public class WxUserInfoApi extends WxOpenApi<WxUserInfoBo> {

    private String accessToken;
    private String openId;

    public WxUserInfoApi(Class<?> tag, Class<WxUserInfoBo> aClass, IResponseListener<WxUserInfoBo> iResponseListener) {
        super(tag, aClass, iResponseListener);
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Override
    protected void setParams() {
        putStringParams("access_token", accessToken);
        putStringParams("openid", openId);
    }

    @Override
    protected String getPath() {
        return "userinfo";
    }
}
